home *** CD-ROM | disk | FTP | other *** search
/ Game Cracker (Expanded Edition) / Game Cracker (Expanded Edition).iso / cracks / SV_WWS.ZIP / World Wide Soccer.txt < prev    next >
Encoding:
Text File  |  1998-09-12  |  16.2 KB  |  333 lines

  1.  
  2. Free Information Xchange '98 presents:
  3.  
  4. World Wide Soccer - CD check crack by Static Vengeance
  5.  
  6. Requirements:
  7. Hex editor and full game install
  8. W32Dasm if you wish to follow along
  9.  
  10.     World Wide Soccer from Sega Entertainment will provide us with our next tutorial.  I had
  11. a chance to look at the original CD so I thought I would crack this game.  I installed the game
  12. and went about making a simular patch to the D3D upgrade that I had already cracked for someone.
  13. After I disassembled it and went through it I had a working crack in a couple of minutes.  There is,
  14. however a trick you need to use for this game.  First do the maxium install allowed (130megs), then
  15. you MUST copy the subdirectory "WAVE" (and all files & directories in it) from the \game\ directory
  16. off the CD to the WWS (where you installed the game) directory on your hard drive.  This will push
  17. the install up to about 200megs or so, however when you make the patch the exe file you'll end up
  18. with 100% cracked and playable version of World Wide Soccer on your hard drive.  Anyway the tutorial
  19. continues:
  20.     It all starts by disassembling wws.exe with W32Dasm (by RUSoft) and going through the usual
  21. tricks outlined time after time in my other articles.  Simply go up to the title bar and select
  22. "Refs" and then select "Data String References" from the drop down menu.  Once the data string refs
  23. box pops up, grab the slider bar and scroll down looking for something that might have to do with
  24. the copy protection.  examples would be "Please insert the SEGA WORLDWIDE SOCCER PC CD." and/or a
  25. reference to file on the CD (which would include a path name) like "Game\wwc_end.dll".  Anyways,
  26. once you find a likly string double click on it and check the surounding code to see what you have
  27. found.  Double clicking on "Please insert..." revealed this:
  28.  
  29. * Referenced by a CALL at Address:
  30. |:00441156   
  31. |
  32. :0043E2A0 81EC88020000            sub esp, 00000288
  33. :0043E2A6 8D842488000000          lea eax, dword ptr [esp+00000088]
  34. :0043E2AD 53                      push ebx
  35. :0043E2AE 55                      push ebp
  36. :0043E2AF 56                      push esi
  37. :0043E2B0 57                      push edi
  38. :0043E2B1 50                      push eax
  39. :0043E2B2 6800010000              push 00000100
  40.  
  41. * Reference To: KERNEL32.GetLogicalDriveStringsA, Ord:00F8h  <-- Another possible text string to
  42.                                   |                          <-- search for "GetLogicalDriveStringsA"
  43. :0043E2B7 FF1598640D01            Call dword ptr [010D6498]
  44. :0043E2BD 85C0                    test eax, eax
  45. :0043E2BF 7510                    jne 0043E2D1              <-- Do the CD check
  46. :0043E2C1 B801000000              mov eax, 00000001         <-- Otherwise set for a failed check
  47. :0043E2C6 5F                      pop edi
  48. :0043E2C7 5E                      pop esi
  49. :0043E2C8 5D                      pop ebp
  50. :0043E2C9 5B                      pop ebx
  51. :0043E2CA 81C488020000            add esp, 00000288
  52. :0043E2D0 C3                      ret                       <-- And return to the caller
  53.  
  54. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  55. |:0043E2BF(C)
  56. |
  57. * Reference To: KERNEL32.OpenFile, Ord:01AFh
  58.                                   |
  59. :0043E2D1 8B1D28650D01            mov ebx, dword ptr [010D6528]
  60.  
  61. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  62. |:0043E3B1(C)
  63. |
  64. :0043E2D7 8A842498000000          mov al, byte ptr [esp+00000098]
  65. :0043E2DE 8DAC2498000000          lea ebp, dword ptr [esp+00000098]
  66. :0043E2E5 84C0                    test al, al
  67. :0043E2E7 0F84AB000000            je 0043E398
  68.  
  69. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  70. |:0043E392(C)
  71. |
  72. :0043E2ED 55                      push ebp
  73.  
  74. * Reference To: KERNEL32.GetDriveTypeA, Ord:00DFh             <-- Another give away text string to
  75.                                   |                           <-- search for is "GetDriveTypeA"
  76. :0043E2EE FF1594640D01            Call dword ptr [010D6494]
  77. :0043E2F4 83F805                  cmp eax, 00000005           <-- 05 is the value for CD-ROM drives
  78. :0043E2F7 0F8581000000            jne 0043E37E
  79. :0043E2FD 8BFD                    mov edi, ebp
  80. :0043E2FF 83C9FF                  or ecx, FFFFFFFF
  81. :0043E302 33C0                    xor eax, eax
  82. :0043E304 8D942498010000          lea edx, dword ptr [esp+00000198]
  83. :0043E30B F2                      repnz
  84. :0043E30C AE                      scasb
  85. :0043E30D F7D1                    not ecx
  86. :0043E30F 2BF9                    sub edi, ecx
  87. :0043E311 6800400000              push 00004000
  88. :0043E316 8BC1                    mov eax, ecx
  89. :0043E318 8BF7                    mov esi, edi
  90. :0043E31A 8BFA                    mov edi, edx
  91. :0043E31C 8D94249C010000          lea edx, dword ptr [esp+0000019C]
  92. :0043E323 C1E902                  shr ecx, 02
  93. :0043E326 F3                      repz
  94. :0043E327 A5                      movsd
  95. :0043E328 8BC8                    mov ecx, eax
  96. :0043E32A 33C0                    xor eax, eax
  97. :0043E32C 83E103                  and ecx, 00000003
  98. :0043E32F F3                      repz
  99. :0043E330 A4                      movsb
  100.  
  101. * Possible StringData Ref from Data Obj ->"Game\wwc_end.dll"    <-- File to check for with CD path
  102.                                   |
  103. :0043E331 8B3D5CE14D00            mov edi, dword ptr [004DE15C]
  104. :0043E337 83C9FF                  or ecx, FFFFFFFF
  105. :0043E33A F2                      repnz
  106. :0043E33B AE                      scasb
  107. :0043E33C F7D1                    not ecx
  108. :0043E33E 2BF9                    sub edi, ecx
  109. :0043E340 8BF7                    mov esi, edi
  110. :0043E342 8BFA                    mov edi, edx
  111. :0043E344 8BD1                    mov edx, ecx
  112. :0043E346 83C9FF                  or ecx, FFFFFFFF
  113. :0043E349 F2                      repnz
  114. :0043E34A AE                      scasb
  115. :0043E34B 8BCA                    mov ecx, edx
  116. :0043E34D 4F                      dec edi
  117. :0043E34E C1E902                  shr ecx, 02
  118. :0043E351 F3                      repz
  119. :0043E352 A5                      movsd
  120. :0043E353 8BCA                    mov ecx, edx
  121. :0043E355 83E103                  and ecx, 00000003
  122. :0043E358 F3                      repz
  123. :0043E359 A4                      movsb
  124. :0043E35A B922000000              mov ecx, 00000022
  125. :0043E35F 8D7C2414                lea edi, dword ptr [esp+14]
  126. :0043E363 F3                      repz
  127. :0043E364 AB                      stosd
  128. :0043E365 8D442414                lea eax, dword ptr [esp+14]
  129. :0043E369 8D8C249C010000          lea ecx, dword ptr [esp+0000019C]
  130. :0043E370 50                      push eax
  131. :0043E371 51                      push ecx
  132. :0043E372 C644241C88              mov [esp+1C], 88
  133. :0043E377 FFD3                    call ebx
  134. :0043E379 83F8FF                  cmp eax, FFFFFFFF
  135. :0043E37C 7549                    jne 0043E3C7          <-- Take this jump to pass CD check
  136.  
  137. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  138. |:0043E2F7(C)
  139. |
  140. :0043E37E 807D0000                cmp byte ptr [ebp+00], 00
  141. :0043E382 7408                    je 0043E38C
  142.  
  143. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  144. |:0043E38A(C)
  145. |
  146. :0043E384 8A4501                  mov al, byte ptr [ebp+01]
  147. :0043E387 45                      inc ebp
  148. :0043E388 84C0                    test al, al
  149. :0043E38A 75F8                    jne 0043E384
  150.  
  151. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  152. |:0043E382(C)
  153. |
  154. :0043E38C 8A4501                  mov al, byte ptr [ebp+01]
  155. :0043E38F 45                      inc ebp
  156. :0043E390 84C0                    test al, al
  157. :0043E392 0F8555FFFFFF            jne 0043E2ED
  158.  
  159. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  160. |:0043E2E7(C)
  161. |
  162. * Possible StringData Ref from Data Obj ->"SEGA Worldwide Soccer PC"
  163.                                   |
  164. :0043E398 8B1550E84D00            mov edx, dword ptr [004DE850]
  165. :0043E39E 6A35                    push 00000035
  166. :0043E3A0 52                      push edx
  167.  
  168. * Possible StringData Ref from Data Obj ->"Please insert the SEGA WORLDWIDE "  <-- Give me the CD!!
  169.                                         ->"SOCCER PC CD."                      <-- Dead give away
  170.                                   |
  171. :0043E3A1 68ACE74D00              push 004DE7AC
  172. :0043E3A6 6A00                    push 00000000
  173.  
  174. * Reference To: USER32.MessageBoxA, Ord:019Bh
  175.                                   |
  176. :0043E3A8 FF1554660D01            Call dword ptr [010D6654]
  177. :0043E3AE 83F802                  cmp eax, 00000002                 <-- 02 means you hit cancel
  178. :0043E3B1 0F8520FFFFFF            jne 0043E2D7                      <-- Otherwise loop up and check again
  179. :0043E3B7 B801000000              mov eax, 00000001                 <-- CD check failed!!!
  180. :0043E3BC 5F                      pop edi
  181. :0043E3BD 5E                      pop esi
  182. :0043E3BE 5D                      pop ebp
  183. :0043E3BF 5B                      pop ebx
  184. :0043E3C0 81C488020000            add esp, 00000288
  185. :0043E3C6 C3                      ret                               <-- But return to the caller anyways
  186.  
  187. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  188. |:0043E37C(C)
  189. |
  190. :0043E3C7 8BFD                    mov edi, ebp                      <-- If you get here the CD check
  191. :0043E3C9 83C9FF                  or ecx, FFFFFFFF                  <-- has passed!!  Yippie
  192. :0043E3CC 33C0                    xor eax, eax
  193. :0043E3CE 8A15A8E74D00            mov dl, byte ptr [004DE7A8]
  194. :0043E3D4 F2                      repnz
  195. :0043E3D5 AE                      scasb
  196. :0043E3D6 F7D1                    not ecx
  197. :0043E3D8 2BF9                    sub edi, ecx
  198. :0043E3DA 8BC1                    mov eax, ecx
  199. :0043E3DC 8BF7                    mov esi, edi
  200. :0043E3DE BFC0786900              mov edi, 006978C0
  201. :0043E3E3 C1E902                  shr ecx, 02
  202. :0043E3E6 F3                      repz
  203. :0043E3E7 A5                      movsd
  204. :0043E3E8 8BC8                    mov ecx, eax
  205. :0043E3EA 33C0                    xor eax, eax             <-- Set for result of the CD check
  206. :0043E3EC 83E103                  and ecx, 00000003        <-- xor eax,eax is the same as loading
  207. :0043E3EF F3                      repz                     <-- eax with zero ( mov eax,00000000 )
  208. :0043E3F0 A4                      movsb                    <-- and a zero on return means it passed
  209. :0043E3F1 BFC0786900              mov edi, 006978C0
  210. :0043E3F6 83C9FF                  or ecx, FFFFFFFF
  211. :0043E3F9 F2                      repnz
  212. :0043E3FA AE                      scasb
  213. :0043E3FB 8B0DA4E74D00            mov ecx, dword ptr [004DE7A4]
  214. :0043E401 4F                      dec edi
  215. :0043E402 890F                    mov dword ptr [edi], ecx
  216. :0043E404 885704                  mov byte ptr [edi+04], dl
  217. :0043E407 5F                      pop edi
  218. :0043E408 5E                      pop esi
  219. :0043E409 5D                      pop ebp
  220. :0043E40A 5B                      pop ebx
  221. :0043E40B 81C488020000            add esp, 00000288
  222. :0043E411 C3                      ret
  223.  
  224.     That was the routine responsible for checking for the original CD.  And if not found it prints
  225. "Please insert the SEGA WORLDWIDE SOCCER PC CD."  From there, if you hit okay it loops back up and
  226. tries again.  Otherwise you need to select cancel (the cmp eax, 00000002) and the program will exit
  227. to Win95 and the game is over.  So we need to look at the section of code that calls the above routine
  228. and see what it does.  The call came from 441156, the call and surounding code looks like this:
  229.  
  230.   -- Program Code --
  231.  
  232. :0044114C C70548E84D0001000000    mov dword ptr [004DE848], 00000001
  233. :00441156 E845D1FFFF              call 0043E2A0                      <-- Check for CD
  234. :0044115B 85C0                    test eax, eax                      <-- what was the result
  235. :0044115D 0F8520060000            jne 00441783                       <-- Not zero means failed!
  236. :00441163 8D542410                lea edx, dword ptr [esp+10]        <-- Continue with the game
  237. :00441167 897C2410                mov dword ptr [esp+10], edi
  238. :0044116B 52                      push edx
  239. :0044116C 6820E44300              push 0043E420
  240.  
  241. * Reference To: USER32.EnumWindows, Ord:00C8h
  242.                                   |
  243. :00441171 FF15DC650D01            Call dword ptr [010D65DC]
  244. :00441177 397C2410                cmp dword ptr [esp+10], edi
  245. :0044117B 0F8502060000            jne 00441783
  246.  
  247. * Reference To: USER32.GetSystemMetrics, Ord:012Ch
  248.                                   |
  249. :00441181 8B35E0650D01            mov esi, dword ptr [010D65E0]
  250. :00441187 57                      push edi
  251. :00441188 FFD6                    call esi
  252. :0044118A 6A01                    push 00000001
  253.  
  254.   -- Continuing Program Code --
  255.  
  256.     Okay, you have the call to the CD check, a test and then a conditional jump.  What I chose to
  257. do here was to change the call to the CD checking routine to XOR eax,eax and three NOP's.  That way eax
  258. is set to zero, you hit the three NOP's and then you test eax to see if it's zero (which we just set).
  259. This way the JNE is never taken and the game will always fall through to the continue code.  And that's
  260. "all" there is to this crack.  Now let's take a quick look at the code from the WWS.exe off the CD:
  261.  
  262.  -- Program Code --
  263.  
  264. :00411161 8B442418                mov eax, dword ptr [esp+18]
  265. :00411165 85C0                    test eax, eax
  266. :00411167 740E                    je 00411177
  267. :00411169 6A00                    push 00000000
  268. :0041116B 6A00                    push 00000000
  269. :0041116D 6A00                    push 00000000
  270. :0041116F 6A55                    push 00000055
  271.  
  272. * Reference To: USER32.SystemParametersInfoA, Ord:023Bh
  273.                                   |
  274. :00411171 FF15E855E700            Call dword ptr [00E755E8]
  275.  
  276. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  277. |:00411167(C)
  278. |
  279. :00411177 E81B850000              call 00419697          <-- Do the CD check
  280. :0041117C 85C0                    test eax, eax
  281. :0041117E 740C                    je 0041118C            <-- Take this jump for good CD check
  282. :00411180 33C0                    xor eax, eax           <-- Setup for Quit to Win95
  283. :00411182 5D                      pop ebp
  284. :00411183 5F                      pop edi
  285. :00411184 5E                      pop esi
  286. :00411185 5B                      pop ebx
  287. :00411186 83C450                  add esp, 00000050
  288. :00411189 C21000                  ret 0010               <-- Return to calller
  289.  
  290. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  291. |:0041117E(C)
  292. |
  293. :0041118C C744241000000000        mov [esp+10], 00000000
  294. :00411194 8D742410                lea esi, dword ptr [esp+10]
  295. :00411198 56                      push esi
  296. :00411199 68EA974100              push 004197EA
  297.  
  298. * Reference To: USER32.EnumWindows, Ord:00C8h
  299.                                   |
  300. :0041119E FF15D056E700            Call dword ptr [00E756D0]
  301. :004111A4 8B442410                mov eax, dword ptr [esp+10]
  302.  
  303.   -- Continuing Program Code --
  304.  
  305.     With this version of WWS (off the CD) there is a call to the CD check routine followed by a je
  306. (Jump Eqaul) to continue the game.  Basicaly the same thing, and the same patch will also work for this
  307. version.  Although implemented in a slightly diferent way, the CD check works the same and can also be
  308. cracked in the same way.  However, the edit has this effect:  Changing the call to the CD checking routine
  309. to XOR eax,eax and three NOP's kills the actual call to the check.  Again, eax is set to zero, followed by
  310. three NOP's; the diference being when you test eax to see if it's zero we want the JE to always be taken.
  311. Then the game will always jump to the continue code and let us play.
  312.  
  313.     To actual steps to crack World Wide Soccer are:
  314.  
  315. 1.  Do a Maximum install
  316. 2.  Copy the WAVE subdirectory to your hard drive
  317. 3.  Make the following edits
  318.  
  319. CD version: Edit wws.exe at offset 66,935
  320. =========================================
  321. Search for: E8 1B 85 00 00
  322. Change to : 33 C0 90 90 90
  323.  
  324. D3D patch: Edit wws.exe at offset 263,510
  325. =========================================
  326. Search for: E8 45 D1 FF FF
  327. Change to : 33 C0 90 90 90
  328.  
  329.     Now you have a 100% functional copy of World Wide Soccer (with or without the D3D patch) you can
  330. play directly from the hard drive without the need for the CD to be present, because it's been FiX'ed
  331.  
  332. Static Vengeance
  333.